package sctu.edu.java.year2016.team05.zengkun.day20160605.chapter11_1;

/**
 * Created by mike on 2016/6/13.
 */






    import java.util.Scanner;
    public class NewException extends Exception{
        class student extends Exception{
            int numpeple;
            int  personal(int numpeple) throws  NewException{
                if (0>numpeple||numpeple>1000) {
                    System.out.println(numpeple+">1000\n抛出异常");
                    throw new  NewException();
                }
                else System.out.println("一切正常numpeple="+numpeple);
                return numpeple;
            }
        }

        public static void main(String[] args) throws  NewException {
            Scanner ss=new Scanner(System.in) ;
            int n=ss.nextInt();
            NewException exceptionWork11_1=new NewException();
            NewException.student Es=exceptionWork11_1.new student();
            Es.personal(n);



        }
    }

